from django.urls import path, include
from rest_framework.routers import DefaultRouter

from apps.common.mini_program.views import WechatLoginView, MiniProgramBindAccount
from apps.pollution.mini_program.views import QuestionViewSet, AnswerViewSet, CompanyViewSet

router = DefaultRouter()

router.register('question', QuestionViewSet, basename='question')
router.register('answer', AnswerViewSet, basename='answer')
router.register('company', CompanyViewSet, basename='company')

urlpatterns = [
    path('api/', include(router.urls)),
    path('login/', WechatLoginView.as_view()),
    path('bind_account/', MiniProgramBindAccount.as_view()),
]
